﻿using System;
using System . Collections . Generic;
using System . IO;
using System . Linq;
using System . Runtime . InteropServices . WindowsRuntime;
using Windows . Foundation;
using Windows . Foundation . Collections;
using Windows . UI . Xaml;
using Windows . UI . Xaml . Controls;
using Windows . UI . Xaml . Controls . Primitives;
using Windows . UI . Xaml . Data;
using Windows . UI . Xaml . Input;
using Windows . UI . Xaml . Media;
using Windows . UI . Xaml . Navigation;


namespace WenceyWang . RichMan4L . Maps . MapDrawers . UWPXaml2DMapDrawer . BlockResources
{
	/// <summary>
	/// 
	/// </summary>
	public sealed partial class SmallAreaBlock : UserControl, IMapObjectView<SmallArea>
	{
		public SmallAreaBlock ( )
		{
			this . InitializeComponent ( );
		}

		public SmallArea SourceObject
		{
			get { return ( SmallArea ) GetValue ( SourceObjectProperty ); }
			set
			{
				if ( value != SourceObject )
				{
					SetValue ( SourceObjectProperty , value );
					Update ( );
				}
			}
		}

		public static readonly DependencyProperty SourceObjectProperty =
			DependencyProperty . Register ( nameof ( SourceObject ) , typeof ( SmallArea ) , typeof ( SmallAreaBlock ) , new PropertyMetadata ( null ) );

		void UpdateDirection ( )
		{
			switch ( SourceObject . GetAzimuth ( SourceObject . Position ) )
			{
				case BlockAzimuth . None:
					{
						
						break;
					}
				case BlockAzimuth . Up:
					{

						break;
					}
				case BlockAzimuth . Down:
					{
						break;
					}
				case BlockAzimuth . Left:
					{
						break;
					}
				case BlockAzimuth . Right:
					{
						break;
					}

			}
		}

		void UpdatePoding ( )
		{

		}

		public void Update ( )
		{
			UpdateDirection ( );
			UpdatePoding ( );
		}
	}
}
